import { createRouter, createWebHistory } from 'vue-router'

const constantRoutes = [
  {
    path: '/',
    name: 'welcome',
    component: () => import('@/views/welcome.vue'),
  },
  {
    path: '/live',
    name: 'live',
    component: () => import('@/views/live/live.vue'),
  },
  {
    path: '/replay',
    name: 'replay',
    component: () => import('@/views/live/replay.vue'),
  },
  {
    path: '/manage/live',
    name: 'liveManage',
    component: () => import('@/views/live/index.vue'),
  },
  {
    path: '/manage/audience',
    name: 'audienceManage',
    component: () => import('@/views/audience/index.vue'),
  },
  {
    path: '/error/401',
    name: 'error401',
    component: () => import('@/views/error/401.vue'),
  },
  {
    path: '/error/404',
    name: 'error404',
    component: () => import('@/views/error/404.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes: constantRoutes,
})

export default router
